/*
 * 文件名：MessgaeType.java
 * 版权：亚信联创版权所有
 * 描述：TODO
 * 修改人：xuwei3
 * 修改时间：2015-5-20
 * 修改内容：TODO
 */
package com.ailk.bigdata.etl.realstream.server.model;

/**
 * @description SDTP协议消息类型定义
 * @author [xuwei3]
 * @version [版本号,2015-5-20]
 * @see [相关类/方法]
 * @since [产品/模块版本]
 */
public enum MessageType
{
	verNego_Req(0x0001), verNego_Resp(0x8001), linkAuth_Req(0x0002), linkAuth_Resp(0x8002), linkCheck_Req(0x0003), linkCheck_Resp(0x8003), linkRel_Req(
			0x0004), linkRel_Resp(0x8004), linkDataCheck_Req(0x0007), linkDataCheck_Resp(0x8007), notifyCDRData_Req(0x0005), notifyCDRData_Resp(
			0x8005), XDRRawDataSend_Req(0x0006), XDRRawDataSend_Resp(0x8006), notifyXDRData_Req(0x0005), notifyXDRData_Resp(0x8005);

	private Integer value;

	private MessageType(Integer value)
	{
		this.value = value;
	}

	public static MessageType getFixedType(Integer index)
	{
		for (MessageType messageType : MessageType.values())
		{
			if (index == messageType.getValue())
			{
				return messageType;
			}
		}
		return null;
	}

	public Integer getValue()
	{
		return value;
	}

	public void setValue(Integer value)
	{
		this.value = value;
	}

}
